// pages/webview/index.js
const { setTitle, navBack } = require('../../common/env');

Page({
    data: {
        url: '',
    },
    onLoad: function (options) {
        const { title = '', url } = options;
        setTitle(title);
        this.setData({
            url: decodeURIComponent(url),
        });
    },
    loadError: function () {
        console.error('页面加载失败');
        navBack();
    },
})